package com.hnevc.caoliuye;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        test();
    }
    private static void test(){
        System.out.println("请输入数据");
        Scanner scanner= new Scanner(System.in);
        int x1 = scanner.nextInt();
        int y1 = scanner.nextInt();
        int x2 = scanner.nextInt();
        int y2 = scanner.nextInt();
        double distance = Math.sqrt(Math.pow((x2 - x1),2) + Math.pow(y2 - y1,2));
        String s = String.format("%2f",distance);
        System.out.println(s);
        ;
        System.out.println("请输入是否继续！ yes or 任意键结束!");
        String str = scanner.next();
        if (str.equals("yes")){
            test();
        }
    }
}
